home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 003 / db2ios.arc / MAINTAIN.SIG < prev    next >
Encoding:
Text File  |  1983-01-04  |  4.5 KB  |  113 lines

  1. * maintain.sig 08/18/83
  2. STORE t TO more
  3. DO WHILE more
  4.     STORE CHR(PEEK(063)) TO dr
  5.     ERASE
  6.     STORE '?' TO command
  7.     @ 02,00 SAY '---------------------'
  8.     @ 02,20 SAY '---------------------'
  9.     @ 02,40 SAY '---------------------'
  10.     @ 02,60 SAY '--------------------'
  11.     @ 02,19 SAY '> > > F I L E  M A I N T E N A N C E < < <'
  12.     @ 04,22 SAY '1. Find duplicate records'
  13.     @ 06,22 SAY '2. Verify and merge new entries'
  14.     @ 08,22 SAY '3. Verify deleted entries'
  15.     @ 10,22 SAY '4. Purge deleted entries from file'
  16.     @ 12,22 SAY '5. Backup data file'
  17.     @ 14,22 SAY '6. Re-index the records'
  18.     @ 16,22 SAY '7. Use browse command'
  19.     @ 18,22 SAY '8. Return to main menu'
  20.     @ 21,00 SAY '--------------------'
  21.     @ 21,20 SAY '--------------------'
  22.     @ 21,40 SAY '--------------------'
  23.     @ 21,60 SAY '--------------------'
  24.     @ 22,22 SAY 'What next'
  25.     @ 22,33 GET command picture '!'
  26.     READ
  27.     DO CASE
  28.         CASE command = '1'
  29.             ERASE
  30.             DO dupcheck.sig
  31.         CASE command = '2'
  32.             ERASE
  33.             DO verifnew.sig
  34.         CASE command = '3'
  35.             ERASE
  36.             DO verifdel.sig
  37.         CASE command = '4'
  38.             DO purge.sig
  39.         CASE command = '5'
  40.             STORE 'Y' TO doit
  41.             ERASE
  42.             @ 01,05 SAY 'This module makes a backup of the DATA File to another disk'
  43.             @ 03,05 SAY 'Do you want to do a backup of the DATA File (Y/N) ?'
  44.             @ 03,59 GET doit PICTURE '!'
  45.             READ
  46.             IF doit = 'Y'
  47.                 @ 03,00
  48.                 @ 07,05 SAY 'The DATA File is on drive '+dr+' and you normally backup to drive B'
  49.                 @ 09,05 SAY 'Make sure the backup disk is in the drive selected for backup'
  50.                 RESET
  51.                 STORE 'B' TO bdr
  52.                 @ 13,05 SAY 'Which drive selected for backup DATA File ? ' GET bdr PICTURE '!'
  53.                 READ
  54.                 DO  WHILE @(bdr,'ABCD') = 0
  55.                     @ 13,05 SAY 'Which drive selected for backup DATA File ? ' GET bdr PICTURE '!'
  56.                     READ
  57.                 ENDDO while @
  58.                 IF bdr <> dr
  59.                     @ 17,05 SAY 'Now copying DATA File from drive '+dr+' to drive '+bdr+ ' '
  60.                     COPY TO &bdr.:sig/mbak
  61.                 ELSE
  62.                     @ 17,05 SAY 'Cant backup to same drive - Aborting'
  63.                     @ 23,00 SAY 'Hit RETURN to Continue'
  64.                     SET CONSOLE OFF
  65.                     WAIT
  66.                     SET CONSOLE ON
  67.                 ENDIF not same drive
  68.             ENDIF do backup
  69.         CASE command = '6'
  70.             * re-initialize index files
  71.             ERASE
  72.             @ 7,10 SAY 'Records are now being re-indexed'
  73.             @ 9,10 SAY 'Please be patient as this takes a little time...'
  74.             INDEX ON !(lname) TO &dr.:orders
  75.         CASE command = '7'
  76.             * browse thru records
  77.             ERASE
  78.             @ 01,12 SAY '***WARNING***  ***WARNING***  ***WARNING***'
  79.             @ 03,13 SAY 'Changes made will be written to the File'
  80.             @ 06,12 SAY 'CTRL-C write current record & go down'
  81.             @ 07,12 SAY 'CTRL-R write current record & go up'
  82.             @ 08,12 SAY 'CTRL-Z/B pans screen left or right'
  83.             @ 09,12 SAY 'CTRL-V toggles Insert on or off'
  84.             @ 10,12 SAY 'CTRL-G Delete character under cursor'
  85.             @ 11,12 SAY 'CTRL-U Delete or Recall current record'
  86.             @ 12,12 SAY 'CTRL-Q exit Dont Write Current record'
  87.             @ 13,12 SAY 'CTRL-W exit and Save all changes'
  88.             * get a starting point in file
  89.             STORE 'A' TO stletter
  90.             @ 22,00
  91.             @ 22,12 SAY 'At what letter of alphabet to start browsing'
  92.             @ 22,57 Get stletter PICTURE '!'
  93.             READ
  94.             * goto starting point or next if no find
  95.             FIND &stletter
  96.             DO WHILE # = 0
  97.                 STORE 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ' TO ALPHABET
  98.                 STORE @(stletter,ALPHABET) + 1 TO NEXL
  99.                 STORE $(ALPHABET,NEXL,1) TO stletter
  100.                 FIND &stletter
  101.                 RELEASE alphabet
  102.             ENDDO while #
  103.             * browse thru file
  104.             SET ESCAPE OFF
  105.             BROWSE
  106.             SET ESCAPE ON
  107.         CASE (command = '8' .OR. command = 'Q')
  108.             STORE f TO more
  109.     ENDCASE
  110. ENDDO while more
  111. RELEASE ALL
  112. STORE t TO first
  113.